/*
 * Created by JFormDesigner on Wed Jun 26 14:24:20 CST 2024
 */

package scct.yangyiheng2.ui;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * @author 杨毅恒
 */
public class FormMain extends JFrame {
    public FormMain() {
        initComponents();
    }

    private void btnUser(ActionEvent e) {
        PanelUserManager panelUserManager=new PanelUserManager(this);
        panelMain.removeAll();
        panelMain.add(panelUserManager,BorderLayout.CENTER);
        validate();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        // Generated using JFormDesigner Evaluation license - YYH
        menuBar1 = new JMenuBar();
        menu1 = new JMenu();
        mnuRegister = new JMenuItem();
        mnuUserManager = new JMenuItem();
        menuItem2 = new JMenuItem();
        menu2 = new JMenu();
        mnuBrandManager = new JMenuItem();
        mnuTypeManager = new JMenuItem();
        mnuGoodsManager = new JMenuItem();
        mnuSellManager = new JMenuItem();
        menu3 = new JMenu();
        mnuAbout = new JMenuItem();
        toolBar1 = new JToolBar();
        btnUser = new JButton();
        btnBrand = new JButton();
        btnType = new JButton();
        btnSell = new JButton();
        panelMain = new JPanel();

        //======== this ========
        setTitle("\u5546\u5e97\u7ba1\u7406\u7cfb\u7edf");
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());

        //======== menuBar1 ========
        {

            //======== menu1 ========
            {
                menu1.setText("\u7cfb\u7edf");

                //---- mnuRegister ----
                mnuRegister.setText("\u7528\u6237\u6ce8\u518c");
                menu1.add(mnuRegister);

                //---- mnuUserManager ----
                mnuUserManager.setText("\u7528\u6237\u7ba1\u7406");
                menu1.add(mnuUserManager);

                //---- menuItem2 ----
                menuItem2.setText("\u9000\u51fa");
                menu1.add(menuItem2);
            }
            menuBar1.add(menu1);

            //======== menu2 ========
            {
                menu2.setText("\u7ba1\u7406");

                //---- mnuBrandManager ----
                mnuBrandManager.setText("\u54c1\u724c\u7ba1\u7406");
                menu2.add(mnuBrandManager);

                //---- mnuTypeManager ----
                mnuTypeManager.setText("\u7c7b\u522b\u7ba1\u7406");
                menu2.add(mnuTypeManager);

                //---- mnuGoodsManager ----
                mnuGoodsManager.setText("\u5546\u54c1\u7ba1\u7406");
                menu2.add(mnuGoodsManager);

                //---- mnuSellManager ----
                mnuSellManager.setText("\u9500\u552e\u7ba1\u7406");
                menu2.add(mnuSellManager);
            }
            menuBar1.add(menu2);

            //======== menu3 ========
            {
                menu3.setText("\u5173\u4e8e");

                //---- mnuAbout ----
                mnuAbout.setText("\u6211\u7684\u9879\u76ee");
                menu3.add(mnuAbout);
            }
            menuBar1.add(menu3);
        }
        setJMenuBar(menuBar1);

        //======== toolBar1 ========
        {
            toolBar1.setFloatable(false);

            //---- btnUser ----
            btnUser.setIcon(new ImageIcon(getClass().getResource("/icon/\u5c0f\u4eba (1).png")));
            btnUser.setBackground(new Color(0xcccccc));
            btnUser.setToolTipText("\u7528\u6237\u7ba1\u7406");
            btnUser.addActionListener(e -> btnUser(e));
            toolBar1.add(btnUser);

            //---- btnBrand ----
            btnBrand.setIcon(new ImageIcon(getClass().getResource("/icon/\u7c7b\u522b\u7ba1\u7406.png")));
            btnBrand.setToolTipText("\u7c7b\u522b\u7ba1\u7406");
            btnBrand.setBackground(new Color(0xcccccc));
            toolBar1.add(btnBrand);

            //---- btnType ----
            btnType.setIcon(new ImageIcon(getClass().getResource("/icon/06\u5546\u54c1-\u7ebf\u6027.png")));
            btnType.setToolTipText("\u5546\u54c1\u7ba1\u7406");
            btnType.setBackground(new Color(0xcccccc));
            toolBar1.add(btnType);

            //---- btnSell ----
            btnSell.setIcon(new ImageIcon(getClass().getResource("/icon/\u91d1\u5e01_o.png")));
            btnSell.setToolTipText("\u9500\u552e\u7ba1\u7406");
            btnSell.setBackground(new Color(0xcccccc));
            toolBar1.add(btnSell);
        }
        contentPane.add(toolBar1, BorderLayout.NORTH);

        //======== panelMain ========
        {
            panelMain.setBorder (new javax. swing. border. CompoundBorder( new javax .swing .border .TitledBorder (new javax. swing. border. EmptyBorder(
            0, 0, 0, 0) , "JF\u006frmDesi\u0067ner Ev\u0061luatio\u006e", javax. swing. border. TitledBorder. CENTER, javax. swing. border. TitledBorder
            . BOTTOM, new java .awt .Font ("Dialo\u0067" ,java .awt .Font .BOLD ,12 ), java. awt. Color.
            red) ,panelMain. getBorder( )) ); panelMain. addPropertyChangeListener (new java. beans. PropertyChangeListener( ){ @Override public void propertyChange (java .
            beans .PropertyChangeEvent e) {if ("borde\u0072" .equals (e .getPropertyName () )) throw new RuntimeException( ); }} );
            panelMain.setLayout(new BorderLayout());
        }
        contentPane.add(panelMain, BorderLayout.CENTER);
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    // Generated using JFormDesigner Evaluation license - YYH
    private JMenuBar menuBar1;
    private JMenu menu1;
    private JMenuItem mnuRegister;
    private JMenuItem mnuUserManager;
    private JMenuItem menuItem2;
    private JMenu menu2;
    private JMenuItem mnuBrandManager;
    private JMenuItem mnuTypeManager;
    private JMenuItem mnuGoodsManager;
    private JMenuItem mnuSellManager;
    private JMenu menu3;
    private JMenuItem mnuAbout;
    private JToolBar toolBar1;
    private JButton btnUser;
    private JButton btnBrand;
    private JButton btnType;
    private JButton btnSell;
    private JPanel panelMain;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
